<html>
  <head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<meta name="layout" content="main" />
	<title><g:message code="default.login.label" /></title>
  </head>
  <body>
	
	<div class="body">
	  <g:if test="${flash.message}">
		<div class="message">${flash.message}</div>
	  </g:if>
	  <g:hasErrors bean="${user}">
		<div class="errors">
		  <g:renderErrors bean="${user}" as="list" />
		</div>
	  </g:hasErrors>
    
      <br/>
      
	  <g:form action="authenticate" method="post" >
		<div class="dialog">
		  <table>
			<tbody>
			  <tr class="prop">
				<td valign="top" class="name">
				  <label for="userName"><g:message code="user.userName.label" />:</label>
				</td>
				<td valign="top" class="value ${hasErrors(bean:user,field:'userName','errors')}">
				  <input type="text" maxlength="16" id="userName" name="userName" value="${fieldValue(bean:user,field:'userName')}"/>
				</td>
			  </tr>
			  <tr class="prop">
				<td valign="top" class="name">
				  <label for="password"><g:message code="user.password.label" />:</label>
				</td>
				<td valign="top" class="value ${hasErrors(bean:user,field:'password','errors')}">
				  <input type="password" maxlength="16" id="password" name="password"/>
				</td>
			  </tr>
			</tbody>
		  </table>
		</div>
		<div class="buttons">
		  <span class="button">
			<input class="save" type="submit" value="${message(code:"default.button.login.label")}" />
		  </span>
		</div>
	  </g:form>
	</div>
	<script>
		//function setFocus(){
			var userName = document.getElementById("userName");
			userName.focus();
		//}
	</script>
  </body>
</html>
